<template>
    <div>   
        <el-form ref="form"  :model="form" label-width="120px">
            <el-row>
                <el-col :span="12">
                    <el-form-item label="姓名">
                        <el-input v-model="form.name" placeholder="姓名"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="性别">
                <el-radio-group v-model="form.gender">
                <el-radio :label="0">女</el-radio>
                <el-radio :label="1">男</el-radio>
                </el-radio-group>
            </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="身份证号">
                        <el-input v-model="form.idcard" placeholder="身份证号"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="年龄">
                        <el-input-number v-model="form.age"></el-input-number>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="电话号码">
                        <el-input v-model="form.phone" placeholder="电话号码"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="8">
                    <el-form-item label="住院时间">
                        <el-date-picker type="date" placeholder="住院时间" v-model="form.date" style="width: 100%;"></el-date-picker>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="治疗医院">
                        <el-input v-model="form.hospital" placeholder="治疗医院"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="是否重症">
                <el-radio-group v-model="form.severe">
                <el-radio :label="0">否</el-radio>
                <el-radio :label="1">是</el-radio>
                </el-radio-group>
            </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :span="12">
                    <el-form-item label="感染来源">
                        <el-input v-model="form.source" placeholder="感染来源"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :span="12">
                    <el-form-item label="症状">
                        <el-input v-model="form.symptom" placeholder="症状"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-form-item label="住址">
                        <el-input v-model="form.address" placeholder="住址"></el-input>
                    </el-form-item>
            <el-form-item label="备注">
                <el-input type="textarea" v-model="form.desc" rows="4"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">提交</el-button>
                <el-button>取消</el-button>
            </el-form-item>
            </el-form>
    </div>
</template>
<script>
  export default {
    data() {
      return {
        form: {
            name: '',
            gender:undefined,
            idcard:'',
            age:undefined,
            phone:'',
            date:'',
            hospital:'',
            severe:0,
            source:'',
            symptom:'',
            address:'',
            desc: '',    
        },
      }
    },
    methods: {
        onSubmit() {
        console.log('submit!');
        }
    }
 }
</script>